home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 66
/
Vol 66.iso
/
games
/
bailer.swf
/
scripts
/
DefineSprite_131_symItem
/
frame_1
/
DoAction.as
Wrap
Text File
|
2013-04-24
|
1KB
|
63 lines
function _frameStep1()
{
var _loc0_ = null;
var _loc2_ = this._xscale += (100 - this._xscale) * 0.5;
if(_loc2_ > 99)
{
_loc2_ = 100;
}
this._xscale = this._yscale = _loc2_;
this._x += ax * 100 / _loc2_;
this._y += ay;
var _loc3_ = ay;
ay += 2;
if(_loc3_ < 0 && ay >= 0)
{
if(this.item_mc != undefined)
{
this.item_mc.gotoAndStop(2);
}
}
if(_loc2_ >= 100)
{
this.onEnterFrame = _frameStep2;
}
}
function _frameStep2()
{
this._x += ax;
this._y += MOVE_SPEED[no - 1];
if(_root.chara_mc.xIsHit(this))
{
this.removeMovieClip();
}
if(this._y > Stage.height + this._height)
{
if(no != 6 && _root.gameState == 1)
{
this._parent.missCnt = this._parent.missCnt + 1;
}
this.removeMovieClip();
}
}
var MOVE_SPEED = [12,10,7,8,13,15];
var state = 0;
var ax = _root.levelNo >= 3 ? Math.random() * 4 - 2 : 0;
var ay = -10;
this.gotoAndStop(no);
if(no != 6)
{
this._rotation = -20 + Math.random() * 40;
}
var w = this._width + 10;
if(this._x - w < 0)
{
this._x += w;
}
if(this._x + w >= Stage.width)
{
this._x -= w;
}
this._xscale = this._yscale = 10;
this.onEnterFrame = _frameStep1;